﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Domain.Model.Form>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Forms
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Manage your forms</h2>

    <table>
        <tr>
            <th></th>
            <th>
                Name
            </th>
        </tr>

    <% foreach (var form in Model) { %>
    
        <tr>
            <td>
                <% if (Helpers.IsAdmin(this)){%>
                    <%: Html.ActionLink("Edit", "Edit", new { id = form.Id })%> |
                <% } %>
                <%: Html.ActionLink("View", "View", new { id = form.Id })%>
            </td>
            <td>
                <%: form.Name%>
            </td>
        </tr>
    
    <% } %>

    </table>

</asp:Content>

